package Q1;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        long num = scanner.nextLong();
        String str = num + "";

        int p = str.length() - 2; //从倒数第二位开始
        while (p >= 0) {
            num = num * 10 + (str.charAt(p) - '0');
            p--;
        }

        if (isPrime(num)) {
            System.out.println("prime");
        } else {
            System.out.println("noprime");
        }
    }

    public static boolean isPrime(long num) {
        if (num == 1 || num == 0) {
            return false;
        }

        if (num == 2) {
            return true;
        }

        for (long i = 2; i <= Math.sqrt(num); i++) {
            if (num % i == 0) {
                return false;
            }
        }

        return true;
    }
}
